﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListTimesheet.ascx.cs"
    Inherits="Presentation.UserControl.ListTimesheet" %>
<table border="0" cellpadding="0" cellspacing="0" id="content-table" width="100%">
    <tr>
        <th rowspan="3" class="sized">
            <img src="/Content/images/shared/side_shadowleft.jpg" width="20" height="300" alt="" />
        </th>
        <th class="topleft">
        </th>
        <td id="tbl-border-top">
            &nbsp;
        </td>
        <th class="topright">
        </th>
        <th rowspan="3" class="sized">
            <img src="/Content/images/shared/side_shadowright.jpg" width="20" height="300" alt="" />
        </th>
    </tr>
    <tr>
        <td id="tbl-border-left">
        </td>
        <td>
            <!--  start content-table-inner -->
            <div id="content-table-inner">
                <fieldset>
                    <legend id="show-hide">Open/Close Filter</legend>
                    <table width="100%" id="table-filter">
                        <tr>
                            <th style="width: 15%">
                                <asp:CheckBox ID="AllSearchCheckBox" runat="server" Text="Enable filter all" AutoPostBack="True" />
                            </th>
                            <td style="width: 20%">
                            </td>
                            <td style="width: 15%">
                            </td>
                            <td style="width: 20%">
                            </td>
                            <td style="width: 15%">
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                From:
                            </th>
                            <td>
                                <asp:TextBox ID="FromDateTextBox" CssClass="inp-datetime" runat="server" />
                            </td>
                            <th>
                                <asp:RegularExpressionValidator ID="FromDateRegularExpressionValidator" runat="server"
                                    ErrorMessage="Start date is invaid !" ForeColor="Red" ControlToValidate="FromDateTextBox"
                                    Display="Dynamic" ValidationExpression="^(((0?[1-9]|1[012])/(0?[1-9]|1\d|2[0-8])|(0?[13456789]|1[012])/(29|30)|(0?[13578]|1[02])/31)/(19|[2-9]\d)\d{2}|0?2/29/((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))$"
                                    CssClass="validation-msg"></asp:RegularExpressionValidator>
                            </th>
                            <td>
                                <strong>Timesheet status: </strong>
                            </td>
                            <td>
                                <asp:DropDownList ID="StatusDropDownList" runat="server" AutoPostBack="True" CssClass="styledselect_form_2">
                                </asp:DropDownList>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                To:
                            </th>
                            <td>
                                <asp:TextBox ID="ToDateTextBox" CssClass="inp-datetime" runat="server" />
                            </td>
                            <td>
                                <asp:RegularExpressionValidator ID="ToDateRegularExpressionValidator" runat="server"
                                    ErrorMessage="Start date is invaid !" ForeColor="Red" ControlToValidate="ToDateTextBox"
                                    Display="Dynamic" ValidationExpression="^(((0?[1-9]|1[012])/(0?[1-9]|1\d|2[0-8])|(0?[13456789]|1[012])/(29|30)|(0?[13578]|1[02])/31)/(19|[2-9]\d)\d{2}|0?2/29/((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))$"
                                    CssClass="validation-msg"></asp:RegularExpressionValidator>
                                <asp:CompareValidator ID="DateCompareValidator" runat="server" Display="Dynamic"
                                    ControlToCompare="FromDateTextBox" ControlToValidate="ToDateTextBox" ErrorMessage="From Date &gt; To Date"
                                    Operator="GreaterThan" Type="Date" CssClass="validation-msg" ForeColor="Red"></asp:CompareValidator>
                            </td>
                            <td>
                            </td>
                            <td>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                            </td>
                            <td>
                            </td>
                            <td>
                            </td>
                            <td>
                            </td>
                            <td>
                                <asp:Button ID="FilterButton" runat="server" CssClass="form-filter" />
                            </td>
                        </tr>
                    </table>
                </fieldset>
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td>
                            <asp:ListView ID="TimesheetListView" runat="server" OnDataBound="TimesheetListView_DataBound">
                                <LayoutTemplate>
                                    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                                        <tr>
                                            <th class="table-header-repeat line-left minwidth-1">
                                                <a href="#">Date</a>
                                            </th>
                                            <th class="table-header-repeat line-left minwidth-1">
                                                <a href="#">Working time</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a href="#">Status</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a href="#">Title</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a href="#">Description</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a href="#">Reason</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a href="#">Option</a>
                                            </th>
                                        </tr>
                                        <tbody>
                                            <asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder>
                                        </tbody>
                                    </table>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <asp:Label ID="TimesheetDateLabel" runat="server" Text='<% #Eval("TimeSheetDate","{0: MM/dd/yyyy}")%>'></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="WorkingTimeLabel" runat="server" Text='<% #Eval("WorkingTime")%>'></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="StatusLabel" runat="server" Text='<% #Eval("Status.StatusName")%>'></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="TitleLabel" runat="server" Text='<%#Eval("Title") %>'></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="DescriptionLabel" runat="server" Text='<%#Eval("Description") %>'></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="ReasonLabel" Width="120px" runat="server" />
                                        </td>
                                        <td>
                                            <asp:Panel ID="OptionPanel" runat="server" Visible="false">
                                                <asp:LinkButton CssClass="icon-6" title="Edit this timesheet" ID="EditLinkButton"
                                                    runat="server" CommandName="Edit"></asp:LinkButton>
                                                &nbsp;
                                                <asp:LinkButton CssClass="icon-2" title="Delete this timesheet" ID="DeleteLinkButton"
                                                    runat="server" OnClientClick="javascript: return confirm('Do you want to delete timesheet ?')"
                                                    CommandName="Delete"></asp:LinkButton>
                                            </asp:Panel>
                                        </td>
                                        <td style="display: none;">
                                            <asp:Label ID="TimeSheetIdLabel" runat="server" Text='<% #Eval("TimeSheetId")%>'></asp:Label>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="TimeSheetTextBox" runat="server" CssClass="inp-datetime-small" Text='<% #Eval("TimeSheetDate","{0: MM/dd/yyyy}")%>'></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="WorkingTimeTextBox" runat="server" CssClass="inp-form-small" Text='<% #Eval("WorkingTime")%>'></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="StatusTextBox" runat="server" Enabled="false" CssClass="inp-form-small"
                                                Text='<% #Eval("Status.StatusName")%>'> ></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TitleTextBox" runat="server" CssClass="inp-form-small" Text='<%#Eval("Title") %>'></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="DesTextBox" runat="server" CssClass="inp-form-small" Text='<%#Eval("Description") %>'></asp:TextBox>
                                        </td>
                                        <td>
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="SaveLinkButton" runat="server" CommandName="Update">Save</asp:LinkButton>
                                            <asp:LinkButton ID="CancelLinkButton" runat="server" CommandName="Cancel">Cancel</asp:LinkButton>
                                        </td>
                                        <td style="display: none;">
                                            <asp:Label ID="TimeSheetIdLabel" runat="server" Text='<% #Eval("TimeSheetId")%>'></asp:Label>
                                        </td>
                                    </tr>
                                </EditItemTemplate>
                                <EmptyDataTemplate>
                                    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                                        <tr>
                                            <th class="table-header-repeat line-left minwidth-1">
                                                <a href="#">Date</a>
                                            </th>
                                            <th class="table-header-repeat line-left minwidth-1">
                                                <a href="#">Working time</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a href="#">Status</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a href="#">Title</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a href="#">Description</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a href="#">Reason</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a href="#">Option</a>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td colspan="7">
                                                There are no timesheets recently
                                            </td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                            </asp:ListView>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:DataPager ID="TimesheetDataPager" runat="server" PagedControlID="TimeSheetListView"
                                PageSize="5">
                                <Fields>
                                    <asp:NextPreviousPagerField FirstPageImageUrl="~/Content/Images/table/paging_far_left.gif"
                                        PreviousPageImageUrl="~/Content/Images/table/paging_left.gif" ButtonType="Button"
                                        ShowLastPageButton="false" ShowPreviousPageButton="true" ShowNextPageButton="false"
                                        ShowFirstPageButton="true" />
                                    <asp:NumericPagerField ButtonCount="5" CurrentPageLabelCssClass="selected-numeric-box"
                                        NumericButtonCssClass="numeric-box" />
                                    <asp:NextPreviousPagerField LastPageImageUrl="~/Content/Images/table/paging_far_right.gif"
                                        NextPageImageUrl="~/Content/Images/table/paging_right.gif" ButtonType="Button"
                                        ShowFirstPageButton="false" ShowNextPageButton="true" ShowLastPageButton="true"
                                        ShowPreviousPageButton="false" />
                                </Fields>
                            </asp:DataPager>
                        </td>
                    </tr>
                </table>
                <div class="clear">
                </div>
            </div>
            <!--  end content-table-inner  -->
        </td>
        <td id="tbl-border-right">
        </td>
    </tr>
    <tr>
        <th class="sized bottomleft">
        </th>
        <td id="tbl-border-bottom">
            &nbsp;
        </td>
        <th class="sized bottomright">
        </th>
    </tr>
</table>
<div class="clear">
    &nbsp;</div>
